package bairui.international.controller.pay.recharge;

import org.springframework.test.web.servlet.MockMvc;
import org.springframework.mock.web.MockHttpSession;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import org.springframework.test.web.servlet.MvcResult;

/**
 *
 * @see C_Pay_Recharge_GeneralUserRechargeNotify_Get 普通用户发起首次支付通知
 *
 */
abstract class STest_C_Pay_Recharge_GeneralUserRechargeNotify_Get<E>
 extends bairui.international.controller.Test_C_Common

{
	
	/**
	 * 请求成功
	 */
	@SuppressWarnings("unchecked")
	public E request_success(
		MockMvc mockMvc, 
		MockHttpSession session
	) throws Exception{
		return 
			(E)tool_restReturn_success(
					request(
						mockMvc, 
						session
					)
				);
	}

	/**
	 * 基础请求
	 */
	public MvcResult request(
		MockMvc mockMvc, 
		MockHttpSession session
	) throws Exception{
		return mockMvc
			.perform(
				MockMvcRequestBuilders
					.get(
					
						new C_Pay_Recharge_GeneralUserRechargeNotify_Get.Get.Operate(){
						}.operate().getUrl()
					)
					.session(session)
			)
		    .andReturn();
	}

}
